package com.dingding.order.core.grab.sql;

/**
 * @ClassName: UserGrabPushSql 
 * @Description: 用户抢单SQL类
 * @author YHQ
 * @date 2016年6月5日 上午11:40:16
 */
public class UserGrabPushSql {

	/**
	 * 乘客抢单查看对方用户信息SQL
	 * 
	 * @author cheshaowei
	 */
	public static final String PASSAGER_GRABORDER_GET_USER_INFO = "SELECT u.uid,ul.userAvatar,ul.nickName,ul.tellphone,u.loginEquipment,ud.tellphone AS sidePhoneNo,ul.userTabloidAvatar,ul.sex,u.aliasId AS aliasId,vi.vehicleType,vi.vehicleModel,vi.vehicleColor,vi.vehicleImage,vi.lisencePlate,ud.nickName AS 'driverName',ul.userLevel FROM userlogin u INNER JOIN userdetail ul ON ul.loginId = ? INNER JOIN userdetail ud ON ud.loginId = u.uid INNER JOIN vehicleinfo vi ON vi.loginId = ud.loginId WHERE u.uid = ?";

	/**
	 * 车主抢单查看对方用户信息SQL
	 * 
	 * @author cheshaowei
	 */
	public static final String DRIVER_GRABORDER_GET_USER_INFO = "SELECT u.uid,ud.userAvatar,ud.nickName,ud.tellphone,u.loginEquipment,ul.tellphone AS sidePhoneNo,ud.userTabloidAvatar,ud.sex,u.aliasId AS aliasId,vi.vehicleType,vi.vehicleModel,vi.vehicleColor,vi.vehicleImage,vi.lisencePlate,ud.nickName AS 'driverName',ud.userLevel  FROM userlogin u INNER JOIN userdetail ud  ON ud.loginId = ? INNER JOIN userdetail ul ON ul.loginId = u.uid  LEFT JOIN vehicleinfo vi ON vi.loginId = ud.loginId  WHERE u.uid = ?";

}
